debugging
[RRRRHHHH_Code] / ruralHouses client / src / gui / OwnerRegistrationGUI.java
index fad1933..b547b82 100644 (file)
@@ -140,11 +140,12 @@ public class OwnerRegistrationGUI extends JFrame {
                                this.bank1Field.getText() + " " + this.bank2Field.getText()
                                                + " " + this.bank3Field.getText() + " "
                                                + this.bank4Field.getText(), this.emailField.getText());
-               Account acc = new Account(this.userNameField.getText(),
-                               this.passField.getText(), own);
+
 
                try {
-                       if (this.am.addAccount(acc)) {
+                       if (this.am.addAccountRequest(this.userNameField.getText(),
+                                       this.passField.getText(), own)) {
+                               this.am.saveInstance();
                                this.feedback.setText("Request sended");
                        } else {
                                this.feedback.setText("Can't send the request");